<?php

$redis = new Redis();
$redis->connect('127.0.0.1');

$redis->del('driver1');

$redis->hSet('driver1', 'name', 'mingming');
$redis->hSet('driver1', 'age', 25);
$redis->hSet('driver1', 'gender', 1);

$value = $redis->hGet('driver1', 'name');
print_r($value);    // mingming

echo '<br>';

$data = $redis->hMGet('driver1', ['name', 'age']);
print_r($data); // Array ( [name] => mingming [age] => 25 )